package de.baumann.browser.fragments.duobao

import de.baumann.browser.R
import de.baumann.browser.adapter.DuoBaoAdapter
import de.baumann.browser.adapter.DuoBaoJieXiaoOrderAdapter
import de.baumann.browser.api.net.vo.duobao.DuoBao
import de.baumann.browser.api.net.vo.duobao.DuoBaoOrder
import de.baumann.browser.base.BaseOdinFragment
import de.baumann.browser.iview.duobao.IDuoBaoOrderView
import de.baumann.browser.present.duobao.DuoBaoOrderPresenter

abstract class OrderFragment : BaseOdinFragment<IDuoBaoOrderView, DuoBaoOrderPresenter>(), IDuoBaoOrderView {

    lateinit var duoBaoOrderAdapter: DuoBaoJieXiaoOrderAdapter
    lateinit var duoBaoAdapter: DuoBaoAdapter

    override fun getLayout(): Int {
        return R.layout.fragment_order
    }


    override fun createPresenter(): DuoBaoOrderPresenter? {
        return DuoBaoOrderPresenter()
    }

    override fun createView(): IDuoBaoOrderView? {
        return this
    }

    override fun setProcessList(list: List<DuoBao>) {
        duoBaoAdapter.setNewData(list)
    }

    override fun setList(list: List<DuoBaoOrder>) {
        duoBaoOrderAdapter.setNewData(list)
    }

}